#pragma once

#pragma comment ( lib , "Dinput8.lib" )
#pragma comment ( lib , "Dxguid.lib" )
#include <Dinput.h>

#include "StdAfx.h"

class CInput
{
public:
	LPDIRECTINPUT8			m_pDI;
	LPDIRECTINPUTDEVICE8	m_pKeyboard;
	LPDIRECTINPUTDEVICE8	m_pMouse;

	char					m_KeyBuffer[256];
	char					m_KeyState[256];

	DIMOUSESTATE2			m_MouseBuffer;
	char					m_MouseState[8];

	float					m_fMousePosX;
	float					m_fMousePosY;
	float					m_fMouseSens;

	bool					m_bUseMouse;

public:
	bool					Init();
	bool					Frame();
	bool					Render( int Pos );
	bool					Release();

	bool					InitDI();
	bool					InitKeyboard();
	bool					InitMouse();

	bool					Update();

	int						KeyPressed( int Key );
	int						MousePressed( int Button );
	bool					MouseControl();	

public:
	CInput(void);
	~CInput(void);
};
